import request from '@/utils/request';

/**
 * 查询全部服务大类信息
 * @returns {AxiosPromise}
 */
export function queryAllParent() {
  return request({
    url: 'rest/config/api/fwfl/parent',
    method: 'get'
  });
}

/**
 * 根据服务大类查询分类信息
 * @param params
 * @returns {AxiosPromise}
 */
export function queryAllFlByPid(params) {
  return request({
    url: 'rest/config/api/fwfl/childer',
    method: 'get',
    params
  });
}

export function queryAllFlByOrganization(params) {
  return request({
    url: 'rest/config/api/service/org',
    method: 'get',
    params
  });
}

/**
 * 查询全部二级分类
 * @param params
 * @returns {AxiosPromise}
 */
export function queryAllFlChild(params) {
  return request({
    url: 'rest/config/api/fwfl/layz',
    method: 'get',
    params
  });
}

/**
 * 查询服务
 * @param params
 * @returns {AxiosPromise}
 */
export function queryAllServiceByFl(params) {
  return request({
    url: 'rest/config/api/fwfl/service',
    method: 'get',
    params
  });
}

/**
 * 查询完整二级分类及服务
 * @param params
 * @returns {AxiosPromise}
 */
export function queryAllServiceByPid(params) {
  return request({
    url: 'rest/config/api/fwfl/service/all',
    method: 'get',
    params
  });
}

/**
 * 查询服务详情
 * @param params
 * @returns {AxiosPromise}
 */
export function queryServiceEntity(params) {
  return request({
    url: 'rest/config/api/special/service',
    method: 'get',
    params
  });
}

export function queryAllDetail(params) {
  return request({
    url: 'rest/config/api/v3/detail/name',
    method: 'get',
    params
  });
}
